/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.tb_waybill.entity;

import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.common.utils.ToolsUtil;
import com.thinkgem.jeesite.modules.tb_discharge_cargo_address.entity.TbDischargeCargoAddress;
import com.thinkgem.jeesite.modules.tb_goods.entity.TbGoods;
import com.thinkgem.jeesite.modules.tb_goods_receipt_company.entity.TbGoodsReceiptCompany;

/**
 * 运单Entity
 * @author ZhangYangZe
 * @version 2017-06-16
 */
public class TbWaybillDetail extends DataEntity<TbWaybillDetail> {
	
	private static final long serialVersionUID = 1L;
	private String waybillId;		// 运单ID
	private Integer num;		// 舱数
	private String settlement;		// 结算方式
	private String goodId;		// 货物Id
	private Double weight;		// 重量
	private Double unitPrice;		// 运价
	private Double money;		// 运费
	private String receiptId;		// 收货方
	private Double length;    // 运输里程
	private String dischargeCargoAddressId;		// 卸货公司、地址、联系方式的id
	private TbGoodsReceiptCompany tbGoodsReceiptCompany;  //收货公司
	private TbDischargeCargoAddress tbDischargeCargoAddress;  //卸货公司、地址、联系方式的
	private TbGoods tbGoods;  //货物	
	public  TbGoodsReceiptCompany getTbGoodsReceiptCompany() {
		return tbGoodsReceiptCompany;
	}

	public void setTbGoodsReceiptCompany(TbGoodsReceiptCompany tbGoodsReceiptCompany) {
		this.tbGoodsReceiptCompany = tbGoodsReceiptCompany;
	}
	
	public TbDischargeCargoAddress getTbDischargeCargoAddress() {
		return tbDischargeCargoAddress;
	}

	public void setTbDischargeCargoAddress(TbDischargeCargoAddress tbDischargeCargoAddress) {
		this.tbDischargeCargoAddress = tbDischargeCargoAddress;
	}
	
	public TbGoods getTbGoods() {
		return tbGoods;
	}

	public void setTbGoods(TbGoods tbGoods) {
		this.tbGoods = tbGoods;
	}
	
	public TbWaybillDetail() {
		super();
	}

	public TbWaybillDetail(String id){
		super(id);
	}

	//@Length(min=1, max=50, message="运单ID长度必须介于 1 和 50 之间")
	public String getWaybillId() {
		return waybillId;
	}

	public void setWaybillId(String waybillId) {
		this.waybillId = waybillId;
	}
	
	//@Length(min=1, max=10, message="舱数长度必须介于 1 和 10 之间")
	public Integer getNum() {
		return num;
	}

	public void setNum(Integer num) {
		if(ToolsUtil.isTrue(num))
		this.num = num;
	}
	
	//@Length(min=1, max=1, message="结算方式长度必须介于 1 和 1 之间")
	public String getSettlement() {
		return settlement;
	}

	public void setSettlement(String settlement) {
		if(ToolsUtil.isTrue(settlement))
		this.settlement = settlement;
	}
	
	//@Length(min=1, max=50, message="货物Id长度必须介于 1 和 50 之间")
	public String getGoodId() {
		return goodId;
	}

	public void setGoodId(String goodId) {
		if(ToolsUtil.isTrue(goodId))
		this.goodId = goodId;
	}
	
	public Double getWeight() {
		return weight;
	}

	public void setWeight(Double weight) {
		if(ToolsUtil.isTrue(weight))
		this.weight = weight;
	}
	
	public Double getUnitPrice() {
		return unitPrice;
	}

	public void setUnitPrice(Double unitPrice) {
		if(ToolsUtil.isTrue(unitPrice))
		this.unitPrice = unitPrice;
	}
	
	public Double getMoney() {
		return money;
	}

	public void setMoney(Double money) {
		if(ToolsUtil.isTrue(money))
		this.money = money;
	}
	
	//@Length(min=1, max=50, message="收货方长度必须介于 1 和 50 之间")
	public String getReceiptId() {
		return receiptId;
	}

	public void setReceiptId(String receiptId) {
		if(ToolsUtil.isTrue(receiptId))
		this.receiptId = receiptId;
	}
	
	//@Length(min=1, max=11, message="卸货地址长度必须介于 1 和 11 之间")
	public String getDischargeCargoAddressId() {
		return dischargeCargoAddressId;
	}

	public void setDischargeCargoAddressId(String dischargeCargoAddressId) {
		if(ToolsUtil.isTrue(dischargeCargoAddressId))
		this.dischargeCargoAddressId = dischargeCargoAddressId;
	}
	
	public Double getLength() {
		return length;
	}

	public void setLength(Double length) {
		this.length = length;
	}
}